package com.education.db.domain;

import javax.persistence.*;

/**
 * Created by Fan on 2016/9/26.
 */
@Entity
@Table(name = "info_course", schema = "db_education", catalog = "")
public class InfoCourse {
    private int coId;
    private String coValue;
    private String coName;

    @Id
    @Column(name = "co_id")
    public int getCoId() {
        return coId;
    }

    public void setCoId(int coId) {
        this.coId = coId;
    }

    @Basic
    @Column(name = "co_value")
    public String getCoValue() {
        return coValue;
    }

    public void setCoValue(String coValue) {
        this.coValue = coValue;
    }

    @Basic
    @Column(name = "co_name")
    public String getCoName() {
        return coName;
    }

    public void setCoName(String coName) {
        this.coName = coName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        InfoCourse that = (InfoCourse) o;

        if (coId != that.coId) return false;
        if (coValue != null ? !coValue.equals(that.coValue) : that.coValue != null) return false;
        if (coName != null ? !coName.equals(that.coName) : that.coName != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = coId;
        result = 31 * result + (coValue != null ? coValue.hashCode() : 0);
        result = 31 * result + (coName != null ? coName.hashCode() : 0);
        return result;
    }
}
